package com.huawei.hwCloudJs.service.locationapi;

import android.content.Context;
import android.util.Log;
import com.huawei.hwCloudJs.api.ILocDialog$DialogResult;
import com.huawei.hwCloudJs.core.JsCallback;
import com.huawei.hwCloudJs.service.locationapi.bean.LocOption;

class GetLocationApi$2 implements ILocDialog$DialogResult {
    final /* synthetic */ LocOption a;
    final /* synthetic */ Context b;
    final /* synthetic */ JsCallback c;
    final /* synthetic */ GetLocationApi d;

    GetLocationApi$2(GetLocationApi getLocationApi, LocOption locOption, Context context, JsCallback jsCallback) {
        this.d = getLocationApi;
        this.a = locOption;
        this.b = context;
        this.c = jsCallback;
    }

    public void onNeg() {
        Log.d("GetLocationApi", "NOTAllowUseLocatioListener onClick");
        if (GetLocationApi.d(this.d) != null) {
            GetLocationApi.d(this.d).dismiss();
            GetLocationApi.a(this.d, null);
        }
        this.c.failure(1, "NOTAllowUseLocation!");
    }

    public void onPos() {
        GetLocationApi.a(this.d, this.a.getAppId(), true);
        GetLocationApi.a(this.d, this.b, this.a, this.c);
    }
}
